<?php
include_once('common/header.php');
if($AppUI->id <= 0 || (isset($_SESSION['slidershow']) && (($_SESSION['slidershow']&1<<1) == 0))) {
	$this->_redirect(HOST_BACKEND);
}
$intType	   	= $objRequest->getParam('type', EDUCATION_TYPE);
$intForm	   	= $objRequest->getParam('form', 0);
$intAlbumId		= $objRequest->getParam('albumid', 0);
$objSlideshow 	= new Slideshow();
if($intForm == 1) {	
	$intPage		= $objRequest->getParam('page', 1);
	$intLimit		= $variable['ADMIN_IMAGE_LIMIT']['val'];
	$intOff			= (($intPage-1) * $intLimit);
	$intTotal		= 0;
	$arrAlbum	   			= $objSlideshow->getAlbumForCombo($intType, 0);
	$arrResult				= $objSlideshow->getAllImg($intAlbumId,$intOff, $intLimit, $intTotal);		
	$this->view->arrResult	= $arrResult;
	$this->view->intTotal	= $intTotal;
	$this->view->intOffset	= $intOff;
	$this->view->intLimit	= $intLimit;
	$this->view->strUrl		= Ecore_Function::getUrl(HOST_BACKEND);
	$this->view->intAlbumId	= $intAlbumId;
	$this->view->arrAlbum	= $arrAlbum;
	
}elseif($intForm == 2) {
	$arrAlbumInfo			= $objSlideshow->get($intAlbumId);
	$this->view->row		= $arrAlbumInfo;
	$this->view->intAlbumId	= $intAlbumId;
}
$this->view->intForm 		= $intForm;
$this->view->intType		= $intType;